<?php  
header("content-type:text/html;charset=utf-8");
?> 


<!doctype html>
<html lang="zh-cn">
 <head>
  <meta charset="UTF-8">  
  <title>动漫类别列表</title>
 </head>
 <body background="upload/10082202447e3a23df3e842fe8.jpg">
 
 <h2 class="text-lift"><a href="admin.php?c=user&m=display">后台首页</a></h2>
 <center><h3>类别列表</h3></center>
 <a href="admin.php?c=type&m=form">添加</a>
 <table align="center" width="80%" border=1> 
 <tr>
   <th>类别编号</th> 
   <th>类别</th>   
   <th>操作 </th>
 </tr>

 <?php
  foreach ($data as $row) {
	 echo '<tr>';
	 echo '<td>'.$row['tid'].'</td>';
	 echo '<td>'.$row['typename'].'</td>';	 
	 echo '<td><a href="admin.php?c=type&m=mod&id='.$row['tid'].' ">修改</a> | 
	 <a href="admin.php?c=type&m=ctdel&id='.$row['tid'].'" onClick="return confirm(\'确定要删除吗？\');">删除</a></td>';
	 echo '</tr>';  
  }
  echo '</table>';  
  $totalrows = count($data);
  echo "<table align='center'><tr><td>共有{$totalrows}种类别</td></tr></table>";   
 ?>
 
 </body>
</html>